package com.liu.controllor;

import com.alibaba.fastjson.JSONObject;
import com.liu.service.UsersClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/consumer/users/")
public class UsersControllor {

    @Autowired
    private UsersClientService usersClientService;


    @RequestMapping(value = "queryUsersCount", method = RequestMethod.GET)
    public JSONObject queryUsersCount(@RequestParam(value = "usersString") String usersString) {
        return usersClientService.queryUsersCount(usersString);
    }

    @RequestMapping(value = "queryUsers", method = RequestMethod.GET)
    public JSONObject queryUsers(@RequestParam(value = "usersString") String usersString) {
        return usersClientService.queryUsers(usersString);
    }

}
